﻿<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="" AutoEventWireup="true" CodeBehind="ItemEdit.aspx.cs" Inherits="THANHTUNGO.Portal.Modules.DOWNLOAD.Pages.ItemEdit" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
 <div class="ModuleContent" >
     <asp:Label ID="Label1" runat="server" Text="THÊM MỚI" SkinID="Header"></asp:Label>
     <hr /><br />
 <table id="Table2" border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
        <tr valign="top">
            <td valign="top">
                <table class="Panel" cellspacing="1" cellpadding="6" width="100%">
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Danh mục</td>
                        <td class="RightColumn" nowrap="nowrap">
                            <asp:DropDownList ID="cbCategory" runat="server" DataTextField="Name" DataValueField="ID" Width="390px">
                            </asp:DropDownList></td>
                    </tr>
                    <tr valign="top">
                        <td class="LeftColumn" nowrap width="1%" valign="middle" align="right">
                            Tiêu đề&nbsp;</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtTitle" runat="server" CssClass="TextBox" Width="390"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                                CssClass="Error" Display="Dynamic" ErrorMessage="Chưa nhập tiêu đề">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="top" width="1%">
                            Phụ đề</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtSubTitle" runat="server" Columns="30" Rows="5" SkinID="MultiLineTextBox"
                                TextMode="MultiLine" Width="390"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtSubTitle"
                                CssClass="Error" Display="Dynamic" ErrorMessage="Chưa nhập phụ đề">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Hình minh họa</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtImageUrl" runat="server" CssClass="TextBox" Width="390"></asp:TextBox></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Liên kết (URL)</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtUrl" runat="server" CssClass="TextBox" Width="390"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtUrl"
                                CssClass="Error" Display="Dynamic" ErrorMessage="Chưa nhập liên kết (url)">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Mirror 1</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtUrl01" runat="server" CssClass="TextBox" Width="390"></asp:TextBox></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Mirror 2</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtUrl02" runat="server" CssClass="TextBox" Width="390"></asp:TextBox></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Mirror 3</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtUrl03" runat="server" CssClass="TextBox" Width="390"></asp:TextBox></td>
                    </tr>
                    <tr valign="top">
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                        </td>
                        <td class="RightColumn">
                            <asp:FileUpload ID="fuFileUpload" runat="server" />
                            <asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Upload" /></td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Kích cỡ tập tin (File Size)</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtFileSize" runat="server" CssClass="TextBox" ToolTip="Nhập vào kích cỡ tập tin tính bằng byte" Width="120px"></asp:TextBox>&nbsp;<asp:DropDownList
                                ID="cbFileSize" runat="server">
                                <asp:ListItem>Bytes</asp:ListItem>
                                <asp:ListItem Selected="True">KB</asp:ListItem>
                                <asp:ListItem>MB</asp:ListItem>
                                <asp:ListItem>GB</asp:ListItem>
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtFileSize"
                                CssClass="Error" Display="Dynamic" ErrorMessage="Chưa nhập kích cỡ tập tin">*</asp:RequiredFieldValidator>
                            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtFileSize"
                                CssClass="Error" ErrorMessage="Kích cỡ tập tin phải là số" Type="Double" MaximumValue="9999999999999999" MinimumValue="0">*</asp:RangeValidator></td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Loại tập tin (File Type)</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtFileType" runat="server" CssClass="TextBox" Width="120px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtFileType"
                                CssClass="Error" Display="Dynamic" ErrorMessage="Chưa nhập loại tập tin">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Từ khóa</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtKeywords" runat="server" Columns="30" CssClass="TextBox" Width="390"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtKeywords"
                                CssClass="Error" Display="Dynamic" ErrorMessage="Chưa nhập từ khóa">*</asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="middle" width="1%">
                            Số lần tải</td>
                        <td class="RightColumn">
                            <asp:TextBox ID="txtTotalDownloads" runat="server" CssClass="ReadOnlyTextBox" ReadOnly="True" Width="390">0</asp:TextBox></td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="top" width="1%">
                            Mô tả</td>
                        <td class="RightColumn">
                            <ftb:freetextbox id="txtDescription" runat="Server" designmodecss="designmode.css" imagegallerypath="~/Data/DOWNLOADS/" imagegalleryurl="ftb.imagegallery.aspx?rif={0}&cif={0}" toolbarlayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable;InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow;InsertTableColumnAfter,InsertTableColumnBefore,DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton,InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle,InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell" width="100%"></ftb:freetextbox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="top" width="1%">
                            Người cập nhật</td>
                        <td class="RightColumn">
                                <asp:Label ID="lblCreatedBy" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td align="right" class="LeftColumn" nowrap="nowrap" valign="top" width="1%">
                            Ngày cập nhật</td>
                        <td class="RightColumn">
                                <asp:Label ID="lblCreationTime" runat="server"></asp:Label></td>
                    </tr>
                </table>
                            <br />
                            <hr />
                            <br />
                            <div style="text-align:center">
                                <asp:LinkButton ID="btnUpdate" runat="server" Text="Ghi" OnClick="btnUpdate_Click" Width="80px"></asp:LinkButton>
                                <asp:LinkButton ID="btnCancel" runat="server" Text="Quay lại" CausesValidation="False" OnClick="btnCancel_Click" Width="80px"></asp:LinkButton>
                                <asp:LinkButton ID="btnDelete" runat="server" Text="Xóa" CausesValidation="False" OnClick="btnDelete_Click" OnClientClick="return confirm('Bạn có muốn xóa bài viết này không?')" Width="80px"></asp:LinkButton>
                                </div>
                                <br />
                <br>
                <div align="center">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Có các lỗi sau:"
                        ShowMessageBox="True" ShowSummary="False" />
                    &nbsp;</div>
            </td>
        </tr>
    </table>
</div>
</asp:Content>
